Updated for the Firebase issue.#41
Conversation
|
|
||
| const packages = await checkbox({ | ||
| let packages = await checkbox({ | ||
| message: "Select optional packages:", | ||
| choices: [ | ||
| { name: "Axios", value: "axios" }, | ||
| { name: "React Icons", value: "react-icons" }, | ||
| { name: "React Hook Form", value: "react-hook-form" }, | ||
| { name: "Yup", value: "yup" }, | ||
| { name: "Formik", value: "formik" }, | ||
| { name: "Moment.js", value: "moment" } | ||
| { name: "Moment.js", value: "moment" }, | ||
| { name: "Firebase (Firestore utils + env)", value: "firebase" } | ||
| ] | ||
| }); | ||
|
|
||
| // Fallback: some terminals or clients may not toggle checkboxes reliably. | ||
| // If Firebase wasn't picked above, ask a simple confirm so the user can't miss it. | ||
| if (!packages.includes('firebase')) { | ||
| try { | ||
| const firebaseConfirm = await confirm({ message: 'Would you like to add Firebase (Firestore utils + env)?', default: false }); | ||
| if (firebaseConfirm) { | ||
| packages = [...packages, 'firebase']; | ||
| } | ||
| } catch (e) { | ||
| // ignore confirm errors and continue | ||
| } | ||
| } | ||
|
|
There was a problem hiding this comment.
Create a dedicated confirmation command for firebase, which ask,
do you want to setup firebase in this project?
If yes then then just simply add it in packages and rest is setup.
|
hey this is my first time contributing to open souce project, should i open a new pull request or is there way to implement here only. also according your last message , env and basic boiler plate code for firebase wont be needed right? |
You can follow the same way where |
Added [firebase.js] a new Firebase helper module implementing configuration and basic helper functions.
Applied integration changes to [index.js] and related code to use the new Firebase helper.